package org.yuchen.controller;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.GenericServlet;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;


public class RegisterServlet extends GenericServlet{
	private static final long serialVersionUID = 1L;

	@Override
	public void service(ServletRequest request, ServletResponse response)
			throws ServletException, IOException {
		String username = request.getParameter("username");
		System.out.println("username is " + username);
		
		// render response
		PrintWriter writer = response.getWriter();
		writer.write("hello " + username);
		
		writer.flush();
	}

}
